<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
	<head>
		<script>
		window.fbAsyncInit = function() {
			FB.init({
				appId : '154392537949945',
				status : true,
				cookie : true,
				xfbml : true
			});
			
			FB.Event.subscribe('auth.login', function(response) {
				// do something with response
				alert("Hello World");
			});
		
			FB.Event.subscribe('auth.logout', function(response) {
				// do something with response
				alert("Goodbye!");
			});
		}
		</script>
	</head>

	<body>
		<div id="fb-root"></div>
		<fb:login-button autologoutlink="true" perms="email,user_birthday,status_update,publish_stream"></fb:login-button>
		<script>
		(function() {
			var e = document.createElement('script');
			e.type = 'text/javascript';
			e.src = document.location.protocol +
			'//connect.facebook.net/en_US/all.js';
			e.async = true;
			document.getElementById('fb-root').appendChild(e);
		}());
		</script>
	</body>
</html>